<?php

namespace app\api\validate;

use think\Validate;

class Contact extends Validate
{
    protected $rule = [
        'name' => 'require',
        'phone' => 'require|mobile|number|length:11',
        'operate' => 'require',
    ];

    protected $message  =   [
        'name.require' => '请填写姓名',
        'phone.require' => '手机号码必须输入',
        'phone.mobile' => '手机号码格式不正确',
        'phone.number'     => '手机号码只能是数字',
        'phone.length'     => '手机号码只能11位数字',
        'operate.require' => '请填写经营产品内容',

    ];
}